home *** CD-ROM | disk | FTP | other *** search
Makefile | 1990-11-26 | 986 b | 42 lines |
- # This sample Makefile allows you to make any SPHIGS application
- # whose source is exactly one .c file.
- #
- # It also can be used to make an application made up of a collection
- # of .c files all having a common prefix.
- #
- # To use this Makefile, you must type:
- #
- # make PROG=xxxx
- # ----
- # where
- # xxxx.c is the name of the file you wish to compile, or
- # ----
- #
- # where
- # xxxx*.c are the names of the files you wish to compile
- # ----
-
- SRGPDIR = /cs/src/srgp
-
- CC = gcc
-
- GCCFLAGS = -fpcc-struct-return
- CFLAGS = -g
-
- INCLUDE = -I../src/sphigs -I$(SRGPDIR)/src/srgp
-
- LDLIBS = -lsphigs -lsrgp -lX11 -lm
- LDFLAGS = -L$(SRGPDIR)/src/srgp -L../src/sphigs
-
-
- executable:
- $(CC) $(GCCFLAGS) $(CFLAGS) $(INCLUDE) $(PROG)*.c \
- $(LDFLAGS) $(LDLIBS) -o $(PROG)
-
- exec_fast: $(PROG)*.o
- $(CC) $(GCCFLAGS) $(CFLAGS) $(INCLUDE) $(PROG)*.o \
- $(LDFLAGS) $(LDLIBS) -o $(PROG)
-
- .c.o: ../src/sphigs/*.h
- $(CC) -c $(GCCFLAGS) $(CFLAGS) $(INCLUDE) $*.c
-